feat: Add files upload / storage support#703
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request introduces a pluggable storage adapter system for VitNode, enabling file uploads to be stored locally on disk or via cloud providers like AWS S3/Cloudflare R2 and Supabase Storage. It adds the core StorageModel with file validation and image optimization using sharp, database schemas for tracking files, and an admin panel interface to test the storage configuration. The review feedback highlights several opportunities to improve robustness, such as safely handling dynamic imports of sharp to avoid masking 500 errors as 400s, sanitizing slashes in URL construction, safely stripping path prefixes in static file serving, and utilizing optional chaining on context lookups to prevent potential runtime crashes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Improving Documentation
pnpm lint:fixto fix formatting issues before opening the PR.Description
What?
Why?